package com.vip.common;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @Author: tianlianyin
 * @Date: 2024/11/27 10:48
 * @Descripition:
 */
@AllArgsConstructor
@Data
public class CommonResult {
    private String code;
    private String message;
    private Object data;

    public static CommonResult success(Object data) {
        return new CommonResult("200", "success", data);
    }

    public static CommonResult error(String message) {
        return new CommonResult("500", message, null);
    }

    public static CommonResult success() {
        return new CommonResult("200", "success", null);
    }
}
